package b4.view.component.admin
{
	import b4.config.BasicObjConfig;
	import b4.config.Config;
	import b4.config.LayerItemConfigCreaturePos;
	
	import org.aswing.JAdjuster;
	import org.aswing.JComboBox;
	import org.aswing.JPanel;
	import org.aswing.JToggleButton;

	public class CreatureItemEditPane extends JPanel
	{
		//怪物索引
		public var creatureIndexCombo:JComboBox;
		//怪物个数
		public var creatureNumAdjuster:JAdjuster;
		//怪物位置
		public var creaturePosCombo:JComboBox;
		//BOSS
		public var bossToggleButton:JToggleButton;
		
		public function CreatureItemEditPane()
		{
			super();
			var creatureIndexes:Array = new Array();
			var objConfig:BasicObjConfig;
			for (var objectIndexStr:String in Config.objConfigs)
			{
				objConfig = Config.objConfigs[objectIndexStr];
				if (objConfig.type == BasicObjConfig.TYPE_CREATURE)
				{
					creatureIndexes.push(objConfig.index);
				}
			}
			creatureIndexes.sort();
			var creatureNames:Array = new Array();
			for (var i:int = 0; i < creatureIndexes.length; i++)
			{
				objConfig = Config.objConfigs[creatureIndexes[i]];
				creatureNames.push(objConfig.index + " " + objConfig.name);
			}
			creatureIndexCombo = new JComboBox(creatureNames);
			creatureIndexCombo.setPreferredWidth(100);
			append(creatureIndexCombo);
			//数量
			creatureNumAdjuster = new JAdjuster(3);
			append(creatureNumAdjuster);
			creaturePosCombo = new JComboBox(["前上", "前中", "前下", "中上", "中中", "中下", "后上", "后中", "后下"]);
			creaturePosCombo.setPreferredWidth(60);
			append(creaturePosCombo);
			//BOSS
			bossToggleButton = new JToggleButton("BOSS");
			append(bossToggleButton);
		}
		
		public function loadCreatureItem(creatureItem:LayerItemConfigCreaturePos):void
		{
			
		}
		
	}
}